<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改business_capital_setting')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-businessCaptialSetting-edit" th:object="${businessCaptialSetting}">
            <input id="capitalId" name="capitalId" th:field="*{capitalId}"  type="hidden">
			<input id="businessId" name="businessId" th:field="*{businessId}"  type="hidden">
			<div class="form-group">	
				<label class="col-sm-3 control-label">提现最小金额：</label>
				<div class="col-sm-8">
					<input required id="minAmount" name="minAmount" th:field="*{minAmount}" class="form-control" type="number" min="0" placeholder="0.00">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">提现最大金额：</label>
				<div class="col-sm-8">
					<input required id="maxAmount" name="maxAmount" th:field="*{maxAmount}" class="form-control" type="number" min="0" placeholder="50000.00">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">单笔手续费：</label>
				<div class="col-sm-8">
					<input required id="rate" name="rate" th:field="*{rate}" class="form-control" type="text">
				</div>
			</div>

			<div class="form-group">	
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
					<input id="remark" name="remark" th:field="*{remark}" class="form-control" type="text">
				</div>
			</div>
		</form>
		<div class="row">
			<div class="col-sm-offset-5 col-sm-10">
				<button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保
					存
				</button>&nbsp;
				<button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭
				</button>
			</div>
		</div>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "channel/businessCaptialSetting";
		$("#form-businessCaptialSetting-edit").validate({
			rules:{
				minAmount: {
					min: 0,
					required: true
				},
				maxAmount: {
					min: 0,
					required: true
				},
				fee: {
					min: 0,
					required: true
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-businessCaptialSetting-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
